package org.shj.basic.traitdemo

class MyQueue extends BasicIntQueue with Doubling

object MyQueue {
  def main(args: Array[String]): Unit = {
    val my = new MyQueue
    my.put(10)
    println(my.get())
    
    val increase = new BasicIntQueue with Doubling with IncreaseQueue
    increase.put(-1)
    increase.put(1)
    println(increase.get())
    println(increase.get()) //输出4，可以得出先混入IncreaseQueue，然后再混入Doubling
  }
}